package com.lct.create;

public class ArrayTest4 {
    public static void main(String[] args) {
        //求数组中所有数据的和
        int[] money = {1,2,3,4,5,6};
        
        int sum = 0;

        for (int i = 0; i < money.length; i++) {
            sum += money[i];
        }

        System.out.println(sum);
        
        
    }
}
